{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy: 0.96\n"
     ]
    }
   ],
   "source": [
    "using RDatasets: dataset\n",
    "using ScikitLearn\n",
    "\n",
    "@sk_import linear_model: LogisticRegression\n",
    "\n",
    "iris = dataset(\"datasets\", \"iris\")\n",
    "\n",
    "X = convert(Array, iris[[:SepalLength, :SepalWidth, :PetalLength, :PetalWidth]])\n",
    "y = convert(Array, iris[:Species])\n",
    "\n",
    "model = fit!(LogisticRegression(), X, y)\n",
    "accuracy = sum(predict(model, X) .== y) / length(y)\n",
    "println(\"accuracy: $accuracy\")  # accuracy on training set"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "//anaconda/lib/python2.7/site-packages/sklearn/cross_validation.py:69: DeprecationWarning: The indices parameter is deprecated and will be removed (assumed True) in 0.17\n",
      "  stacklevel=1)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "5-element Array{Float64,1}:\n",
       " 1.0     \n",
       " 0.966667\n",
       " 0.933333\n",
       " 0.9     \n",
       " 1.0     "
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "using ScikitLearn.CrossValidation: cross_val_score\n",
    "\n",
    "cross_val_score(LogisticRegression(), X, y, cv=5)  # 5-fold"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "using ScikitLearn.GridSearch: GridSearchCV"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Skcore.GridSearchCV\n",
       "  estimator: PyObject LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n",
       "          intercept_scaling=1, max_iter=100, multi_class='ovr',\n",
       "          penalty='l2', random_state=None, solver='liblinear', tol=0.0001,\n",
       "          verbose=0)\n",
       "  param_grid: Dict(:C=>0.1:1.0:1.1)\n",
       "  scoring: nothing\n",
       "  loss_func: nothing\n",
       "  score_func: nothing\n",
       "  fit_params: Dict{Any,Any}()\n",
       "  n_jobs: 1\n",
       "  iid: true\n",
       "  refit: true\n",
       "  cv: nothing\n",
       "  verbose: 0\n",
       "  error_score: raise\n",
       "  scorer_: nothing\n",
       "  best_params_: nothing\n",
       "  best_score_: nothing\n",
       "  grid_scores_: nothing\n",
       "  best_estimator_: nothing"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING: both StatsBase and Base export \"histrange\"; uses of it in module DataArrays must be qualified\n",
      "WARNING: both StatsBase and Base export \"midpoints\"; uses of it in module DataArrays must be qualified\n",
      "WARNING: both DataArrays and StatsBase export \"autocor\"; uses of it in module DataFrames must be qualified\n",
      "WARNING: both DataArrays and StatsBase export \"histrange\"; uses of it in module DataFrames must be qualified\n",
      "WARNING: both DataArrays and StatsBase export \"inverse_rle\"; uses of it in module DataFrames must be qualified\n",
      "WARNING: both DataArrays and StatsBase export \"midpoints\"; uses of it in module DataFrames must be qualified\n",
      "WARNING: both DataArrays and StatsBase export \"rle\"; uses of it in module DataFrames must be qualified\n",
      "WARNING: both DataFrames and Base export \"histrange\"; uses of it in module RDatasets must be qualified\n",
      "WARNING: both DataFrames and Base export \"midpoints\"; uses of it in module RDatasets must be qualified\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "No documentation found.\n",
       "\\textbf{Summary:}\n",
       "\\begin{verbatim}\n",
       "immutable Skcore.CVScoreTuple <: Any\n",
       "\\end{verbatim}\n",
       "\\textbf{Fields:}\n",
       "\\begin{verbatim}\n",
       "parameters            :: Any\n",
       "mean_validation_score :: Any\n",
       "cv_validation_scores  :: Any\n",
       "\\end{verbatim}\n"
      ],
      "text/markdown": [
       "No documentation found.\n",
       "\n",
       "**Summary:**\n",
       "\n",
       "```julia\n",
       "immutable Skcore.CVScoreTuple <: Any\n",
       "```\n",
       "\n",
       "**Fields:**\n",
       "\n",
       "```julia\n",
       "parameters            :: Any\n",
       "mean_validation_score :: Any\n",
       "cv_validation_scores  :: Any\n",
       "```\n"
      ],
      "text/plain": [
       "No documentation found.\n",
       "\n",
       "**Summary:**\n",
       "\n",
       "```julia\n",
       "immutable Skcore.CVScoreTuple <: Any\n",
       "```\n",
       "\n",
       "**Fields:**\n",
       "\n",
       "```julia\n",
       "parameters            :: Any\n",
       "mean_validation_score :: Any\n",
       "cv_validation_scores  :: Any\n",
       "```\n"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "?Skcore.CVScoreTuple"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "//anaconda/lib/python2.7/site-packages/sklearn/cross_validation.py:69: DeprecationWarning: The indices parameter is deprecated and will be removed (assumed True) in 0.17\n",
      "  stacklevel=1)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Best parameters: Dict{Symbol,Any}(:C=>1.1)\n"
     ]
    }
   ],
   "source": [
    "gridsearch = GridSearchCV(LogisticRegression(), Dict(:C => 0.1:0.1:2.0))\n",
    "fit!(gridsearch, X, y)\n",
    "println(\"Best parameters: $(gridsearch.best_params_)\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAArQAAAIUCAYAAADrIr80AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz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3LcAiJkyYYNhsNsNmsxl2u92w2+3m33vnFmsbQmGwc411DYEqKioy59X//rHb7Wa74V7TRvQOLQAAAHAzI/YZWgAAACAQBFoAAABYGoEWAAAAlkagBQAAgKURaAEAAGBpBFoAAABYGoEWAAAAlkagBQAAgKURaAEAAGBpBFoAAABYGoEWAAAAlkagBQAAgKX9H3ai4yW3kSkYAAAAAElFTkSuQmCC",
      "text/plain": [
       "PyPlot.Figure(PyObject <matplotlib.figure.Figure object at 0x318db9250>)"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "1-element Array{Any,1}:\n",
       " PyObject <matplotlib.lines.Line2D object at 0x318bd6b90>"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "using PyPlot\n",
    "\n",
    "plot([cv_res.parameters[:C] for cv_res in gridsearch.grid_scores_],\n",
    "[mean(cv_res.cv_validation_scores) for cv_res in gridsearch.grid_scores_])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "search: "
     ]
    },
    {
     "data": {
      "text/latex": [
       "Exhaustive search over specified parameter values for an estimator.\n",
       "Important members are fit, predict.\n",
       "GridSearchCV implements a \"fit\" method and a \"predict\" method like any classifier except that the parameters of the classifier used to predict is optimized by cross-validation.\n",
       "\\subsection{Parameters}\n",
       "estimator : object type that implements the \"fit\" and \"predict\" methods     A object of that type is instantiated for each grid point.\n",
       "param\\_grid : dict or list of dictionaries     Dictionary with parameters names (string) as keys and lists of     parameter settings to try as values, or a list of such     dictionaries, in which case the grids spanned by each dictionary     in the list are explored. This enables searching over any sequence     of parameter settings.\n",
       "scoring : string, callable or None, optional, default: None     A string (see model evaluation documentation) or     a scorer callable object / function with signature     \\texttt{scorer(estimator, X, y)}.\n",
       "fit\\_params : dict, optional     Parameters to pass to the fit method.\n",
       "n\\_jobs : int, default 1     Number of jobs to run in parallel.\n",
       "pre\\_dispatch : int, or string, optional     Controls the number of jobs that get dispatched during parallel     execution. Reducing this number can be useful to avoid an     explosion of memory consumption when more jobs get dispatched     than CPUs can process. This parameter can be:\n",
       "\\begin{verbatim}\n",
       "    - None, in which case all the jobs are immediately\n",
       "      created and spawned. Use this for lightweight and\n",
       "      fast-running jobs, to avoid delays due to on-demand\n",
       "      spawning of the jobs\n",
       "\n",
       "    - An int, giving the exact number of total jobs that are\n",
       "      spawned\n",
       "\n",
       "    - A string, giving an expression as a function of n_jobs,\n",
       "      as in '2*n_jobs'\n",
       "\\end{verbatim}\n",
       "iid : boolean, default=True     If True, the data is assumed to be identically distributed across     the folds, and the loss minimized is the total loss per sample,     and not the mean loss across the folds.\n",
       "cv : integer or cross-validation generator, default=3     If an integer is passed, it is the number of folds.     Specific cross-validation objects can be passed, see     sklearn.cross\\_validation module for the list of possible objects\n",
       "refit : boolean, default=True     Refit the best estimator with the entire dataset.     If \"False\", it is impossible to make predictions using     this GridSearchCV instance after fitting.\n",
       "verbose : integer     Controls the verbosity: the higher, the more messages.\n",
       "error\\_score : 'raise' (default) or numeric     Value to assign to the score if an error occurs in estimator fitting.     If set to 'raise', the error is raised. If a numeric value is given,     FitFailedWarning is raised. This parameter does not affect the refit     step, which will always raise the error.\n",
       "\\subsection{Examples}\n",
       "\\begin{quote}\n",
       "\\begin{quote}\n",
       "\\begin{quote}\n",
       "from sklearn import svm, grid\\_search, datasets iris = datasets.load\\_iris() parameters = \\{'kernel':('linear', 'rbf'), 'C':[1, 10]\\} svr = svm.SVC() clf = grid\\_search.GridSearchCV(svr, parameters) clf.fit(iris.data, iris.target)\n",
       "\\end{quote}\n",
       "\\end{quote}\n",
       "\\end{quote}\n",
       "...                             \\# doctest: +NORMALIZE\\_WHITESPACE +ELLIPSIS GridSearchCV(cv=None, error\\_score=...,        estimator=SVC(C=1.0, cache\\_size=..., class\\_weight=..., coef0=...,                      degree=..., gamma=..., kernel='rbf', max\\_iter=-1,                      probability=False, random\\_state=None, shrinking=True,                      tol=..., verbose=False),        fit\\_params=\\{\\}, iid=..., n\\_jobs=1,        param\\_grid=..., pre\\_dispatch=..., refit=...,        scoring=..., verbose=...)\n",
       "\\subsection{Attributes}\n",
       "grid\\_scores\\_ : list of named tuples     Contains scores for all parameter combinations in param\\_grid.     Each entry corresponds to one parameter setting.     Each named tuple has the attributes:\n",
       "\\begin{verbatim}\n",
       "    * ``parameters``, a dict of parameter settings\n",
       "    * ``mean_validation_score``, the mean score over the\n",
       "      cross-validation folds\n",
       "    * ``cv_validation_scores``, the list of scores for each fold\n",
       "\\end{verbatim}\n",
       "best\\_estimator\\_ : estimator     Estimator that was chosen by the search, i.e. estimator     which gave highest score (or smallest loss if specified)     on the left out data. Not available if refit=False.\n",
       "best\\_score\\_ : float     Score of best\\_estimator on the left out data.\n",
       "best\\_params\\_ : dict     Parameter setting that gave the best results on the hold out data.\n",
       "scorer\\_ : function     Scorer function used on the held out data to choose the best     parameters for the model.\n",
       "\\subsection{Notes}\n",
       "The parameters selected are those that maximize the score of the left out data, unless an explicit score is passed in which case it is used instead.\n",
       "If \\texttt{n_jobs} was set to a value higher than one, the data is copied for each point in the grid (and not \\texttt{n_jobs} times). This is done for efficiency reasons if individual jobs take very little time, but may raise errors if the dataset is large and not enough memory is available.  A workaround in this case is to set \\texttt{pre_dispatch}. Then, the memory is copied only \\texttt{pre_dispatch} many times. A reasonable value for \\texttt{pre_dispatch} is \\texttt{2 * n_jobs}.\n",
       "\\subsection{See Also}\n",
       ":class:\\texttt{ParameterGrid}:     generates all the combinations of a an hyperparameter grid.\n",
       ":func:\\texttt{sklearn.cross_validation.train_test_split}:     utility function to split the data into a development set usable     for fitting a GridSearchCV instance and an evaluation set for     its final evaluation.\n",
       ":func:\\texttt{sklearn.metrics.make_scorer}:     Make a scorer from a performance metric or loss function.\n"
      ],
      "text/markdown": [
       "Exhaustive search over specified parameter values for an estimator.\n",
       "\n",
       "Important members are fit, predict.\n",
       "\n",
       "GridSearchCV implements a \"fit\" method and a \"predict\" method like any classifier except that the parameters of the classifier used to predict is optimized by cross-validation.\n",
       "\n",
       "## Parameters\n",
       "\n",
       "estimator : object type that implements the \"fit\" and \"predict\" methods     A object of that type is instantiated for each grid point.\n",
       "\n",
       "param_grid : dict or list of dictionaries     Dictionary with parameters names (string) as keys and lists of     parameter settings to try as values, or a list of such     dictionaries, in which case the grids spanned by each dictionary     in the list are explored. This enables searching over any sequence     of parameter settings.\n",
       "\n",
       "scoring : string, callable or None, optional, default: None     A string (see model evaluation documentation) or     a scorer callable object / function with signature     `scorer(estimator, X, y)`.\n",
       "\n",
       "fit_params : dict, optional     Parameters to pass to the fit method.\n",
       "\n",
       "n_jobs : int, default 1     Number of jobs to run in parallel.\n",
       "\n",
       "pre_dispatch : int, or string, optional     Controls the number of jobs that get dispatched during parallel     execution. Reducing this number can be useful to avoid an     explosion of memory consumption when more jobs get dispatched     than CPUs can process. This parameter can be:\n",
       "\n",
       "```\n",
       "    - None, in which case all the jobs are immediately\n",
       "      created and spawned. Use this for lightweight and\n",
       "      fast-running jobs, to avoid delays due to on-demand\n",
       "      spawning of the jobs\n",
       "\n",
       "    - An int, giving the exact number of total jobs that are\n",
       "      spawned\n",
       "\n",
       "    - A string, giving an expression as a function of n_jobs,\n",
       "      as in '2*n_jobs'\n",
       "```\n",
       "\n",
       "iid : boolean, default=True     If True, the data is assumed to be identically distributed across     the folds, and the loss minimized is the total loss per sample,     and not the mean loss across the folds.\n",
       "\n",
       "cv : integer or cross-validation generator, default=3     If an integer is passed, it is the number of folds.     Specific cross-validation objects can be passed, see     sklearn.cross_validation module for the list of possible objects\n",
       "\n",
       "refit : boolean, default=True     Refit the best estimator with the entire dataset.     If \"False\", it is impossible to make predictions using     this GridSearchCV instance after fitting.\n",
       "\n",
       "verbose : integer     Controls the verbosity: the higher, the more messages.\n",
       "\n",
       "error_score : 'raise' (default) or numeric     Value to assign to the score if an error occurs in estimator fitting.     If set to 'raise', the error is raised. If a numeric value is given,     FitFailedWarning is raised. This parameter does not affect the refit     step, which will always raise the error.\n",
       "\n",
       "## Examples\n",
       "\n",
       "> > > from sklearn import svm, grid_search, datasets iris = datasets.load_iris() parameters = {'kernel':('linear', 'rbf'), 'C':[1, 10]} svr = svm.SVC() clf = grid_search.GridSearchCV(svr, parameters) clf.fit(iris.data, iris.target)\n",
       "\n",
       "\n",
       "...                             # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS GridSearchCV(cv=None, error_score=...,        estimator=SVC(C=1.0, cache_size=..., class_weight=..., coef0=...,                      degree=..., gamma=..., kernel='rbf', max_iter=-1,                      probability=False, random_state=None, shrinking=True,                      tol=..., verbose=False),        fit_params={}, iid=..., n_jobs=1,        param_grid=..., pre_dispatch=..., refit=...,        scoring=..., verbose=...)\n",
       "\n",
       "## Attributes\n",
       "\n",
       "grid_scores_ : list of named tuples     Contains scores for all parameter combinations in param_grid.     Each entry corresponds to one parameter setting.     Each named tuple has the attributes:\n",
       "\n",
       "```\n",
       "    * ``parameters``, a dict of parameter settings\n",
       "    * ``mean_validation_score``, the mean score over the\n",
       "      cross-validation folds\n",
       "    * ``cv_validation_scores``, the list of scores for each fold\n",
       "```\n",
       "\n",
       "best_estimator_ : estimator     Estimator that was chosen by the search, i.e. estimator     which gave highest score (or smallest loss if specified)     on the left out data. Not available if refit=False.\n",
       "\n",
       "best_score_ : float     Score of best_estimator on the left out data.\n",
       "\n",
       "best_params_ : dict     Parameter setting that gave the best results on the hold out data.\n",
       "\n",
       "scorer_ : function     Scorer function used on the held out data to choose the best     parameters for the model.\n",
       "\n",
       "## Notes\n",
       "\n",
       "The parameters selected are those that maximize the score of the left out data, unless an explicit score is passed in which case it is used instead.\n",
       "\n",
       "If `n_jobs` was set to a value higher than one, the data is copied for each point in the grid (and not `n_jobs` times). This is done for efficiency reasons if individual jobs take very little time, but may raise errors if the dataset is large and not enough memory is available.  A workaround in this case is to set `pre_dispatch`. Then, the memory is copied only `pre_dispatch` many times. A reasonable value for `pre_dispatch` is `2 * n_jobs`.\n",
       "\n",
       "## See Also\n",
       "\n",
       ":class:`ParameterGrid`:     generates all the combinations of a an hyperparameter grid.\n",
       "\n",
       ":func:`sklearn.cross_validation.train_test_split`:     utility function to split the data into a development set usable     for fitting a GridSearchCV instance and an evaluation set for     its final evaluation.\n",
       "\n",
       ":func:`sklearn.metrics.make_scorer`:     Make a scorer from a performance metric or loss function.\n"
      ],
      "text/plain": [
       "Exhaustive search over specified parameter values for an estimator.\n",
       "\n",
       "Important members are fit, predict.\n",
       "\n",
       "GridSearchCV implements a \"fit\" method and a \"predict\" method like any classifier except that the parameters of the classifier used to predict is optimized by cross-validation.\n",
       "\n",
       "## Parameters\n",
       "\n",
       "estimator : object type that implements the \"fit\" and \"predict\" methods     A object of that type is instantiated for each grid point.\n",
       "\n",
       "param_grid : dict or list of dictionaries     Dictionary with parameters names (string) as keys and lists of     parameter settings to try as values, or a list of such     dictionaries, in which case the grids spanned by each dictionary     in the list are explored. This enables searching over any sequence     of parameter settings.\n",
       "\n",
       "scoring : string, callable or None, optional, default: None     A string (see model evaluation documentation) or     a scorer callable object / function with signature     `scorer(estimator, X, y)`.\n",
       "\n",
       "fit_params : dict, optional     Parameters to pass to the fit method.\n",
       "\n",
       "n_jobs : int, default 1     Number of jobs to run in parallel.\n",
       "\n",
       "pre_dispatch : int, or string, optional     Controls the number of jobs that get dispatched during parallel     execution. Reducing this number can be useful to avoid an     explosion of memory consumption when more jobs get dispatched     than CPUs can process. This parameter can be:\n",
       "\n",
       "```\n",
       "    - None, in which case all the jobs are immediately\n",
       "      created and spawned. Use this for lightweight and\n",
       "      fast-running jobs, to avoid delays due to on-demand\n",
       "      spawning of the jobs\n",
       "\n",
       "    - An int, giving the exact number of total jobs that are\n",
       "      spawned\n",
       "\n",
       "    - A string, giving an expression as a function of n_jobs,\n",
       "      as in '2*n_jobs'\n",
       "```\n",
       "\n",
       "iid : boolean, default=True     If True, the data is assumed to be identically distributed across     the folds, and the loss minimized is the total loss per sample,     and not the mean loss across the folds.\n",
       "\n",
       "cv : integer or cross-validation generator, default=3     If an integer is passed, it is the number of folds.     Specific cross-validation objects can be passed, see     sklearn.cross_validation module for the list of possible objects\n",
       "\n",
       "refit : boolean, default=True     Refit the best estimator with the entire dataset.     If \"False\", it is impossible to make predictions using     this GridSearchCV instance after fitting.\n",
       "\n",
       "verbose : integer     Controls the verbosity: the higher, the more messages.\n",
       "\n",
       "error_score : 'raise' (default) or numeric     Value to assign to the score if an error occurs in estimator fitting.     If set to 'raise', the error is raised. If a numeric value is given,     FitFailedWarning is raised. This parameter does not affect the refit     step, which will always raise the error.\n",
       "\n",
       "## Examples\n",
       "\n",
       "> > > from sklearn import svm, grid_search, datasets iris = datasets.load_iris() parameters = {'kernel':('linear', 'rbf'), 'C':[1, 10]} svr = svm.SVC() clf = grid_search.GridSearchCV(svr, parameters) clf.fit(iris.data, iris.target)\n",
       "\n",
       "\n",
       "...                             # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS GridSearchCV(cv=None, error_score=...,        estimator=SVC(C=1.0, cache_size=..., class_weight=..., coef0=...,                      degree=..., gamma=..., kernel='rbf', max_iter=-1,                      probability=False, random_state=None, shrinking=True,                      tol=..., verbose=False),        fit_params={}, iid=..., n_jobs=1,        param_grid=..., pre_dispatch=..., refit=...,        scoring=..., verbose=...)\n",
       "\n",
       "## Attributes\n",
       "\n",
       "grid_scores_ : list of named tuples     Contains scores for all parameter combinations in param_grid.     Each entry corresponds to one parameter setting.     Each named tuple has the attributes:\n",
       "\n",
       "```\n",
       "    * ``parameters``, a dict of parameter settings\n",
       "    * ``mean_validation_score``, the mean score over the\n",
       "      cross-validation folds\n",
       "    * ``cv_validation_scores``, the list of scores for each fold\n",
       "```\n",
       "\n",
       "best_estimator_ : estimator     Estimator that was chosen by the search, i.e. estimator     which gave highest score (or smallest loss if specified)     on the left out data. Not available if refit=False.\n",
       "\n",
       "best_score_ : float     Score of best_estimator on the left out data.\n",
       "\n",
       "best_params_ : dict     Parameter setting that gave the best results on the hold out data.\n",
       "\n",
       "scorer_ : function     Scorer function used on the held out data to choose the best     parameters for the model.\n",
       "\n",
       "## Notes\n",
       "\n",
       "The parameters selected are those that maximize the score of the left out data, unless an explicit score is passed in which case it is used instead.\n",
       "\n",
       "If `n_jobs` was set to a value higher than one, the data is copied for each point in the grid (and not `n_jobs` times). This is done for efficiency reasons if individual jobs take very little time, but may raise errors if the dataset is large and not enough memory is available.  A workaround in this case is to set `pre_dispatch`. Then, the memory is copied only `pre_dispatch` many times. A reasonable value for `pre_dispatch` is `2 * n_jobs`.\n",
       "\n",
       "## See Also\n",
       "\n",
       ":class:`ParameterGrid`:     generates all the combinations of a an hyperparameter grid.\n",
       "\n",
       ":func:`sklearn.cross_validation.train_test_split`:     utility function to split the data into a development set usable     for fitting a GridSearchCV instance and an evaluation set for     its final evaluation.\n",
       "\n",
       ":func:`sklearn.metrics.make_scorer`:     Make a scorer from a performance metric or loss function.\n"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "GridSearchCV\n",
      "\n"
     ]
    }
   ],
   "source": [
    "?GridSearchCV"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "Grid"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "using PyCall"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "ename": "LoadError",
     "evalue": "LoadError: UndefVarError: np not defined\nwhile loading In[36], in expression starting on line 1",
     "output_type": "error",
     "traceback": [
      "LoadError: UndefVarError: np not defined\nwhile loading In[36], in expression starting on line 1",
      ""
     ]
    }
   ],
   "source": [
    "PyCall.np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "@pyimport numpy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "PyObject <type 'numpy.ndarray'>"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pytypeof(model[:predict](X))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "true"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pyisinstance(model[:predict](X), numpy.ndarray)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "@pyimport sklearn.decomposition as decomp\n",
    "@pyimport sklearn.linear_model as lin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "50-element Array{Float64,1}:\n",
       " 0.576159\n",
       " 0.515207\n",
       " 0.460496\n",
       " 0.776257\n",
       " 0.399474\n",
       " 0.716152\n",
       " 0.599655\n",
       " 0.407837\n",
       " 0.297651\n",
       " 0.456131\n",
       " 0.47505 \n",
       " 0.538591\n",
       " 0.412948\n",
       " ⋮       \n",
       " 0.372059\n",
       " 0.598074\n",
       " 0.690691\n",
       " 0.331754\n",
       " 0.244016\n",
       " 0.473066\n",
       " 0.569893\n",
       " 0.617866\n",
       " 0.294397\n",
       " 0.255887\n",
       " 0.475892\n",
       " 0.221029"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "log_mod = lin.LinearRegression()[:fit](randn(50, 3), rand(0:1, 50))\n",
    "log_mod[:predict](randn(50, 3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "30x10 Array{Float64,2}:\n",
       " -1.37028     2.38158    -2.51188    …   0.0300709   0.6883     -1.33512   \n",
       " -0.722243    0.61567     0.60023        0.031614   -0.117785    0.785895  \n",
       " -0.180335   -0.461928    0.0203785     -0.154542    0.74715    -1.6326    \n",
       "  0.121689   -0.274719    0.105053       0.136517    0.51691    -0.759665  \n",
       " -1.80948     0.293112    1.49397       -0.979369    0.536213   -0.725335  \n",
       " -2.02625     1.07568     2.6085     …   0.647457   -0.479787   -1.3383    \n",
       "  1.31527     0.95843    -0.190644       1.04659     0.177057    0.400437  \n",
       "  0.737426   -0.819624    1.35347       -0.778575    0.471231   -0.151562  \n",
       " -1.0219      0.495866    0.24758        1.21719     0.359032   -0.709399  \n",
       "  0.706288   -1.24462     0.749513      -0.766897   -1.73381    -0.267117  \n",
       " -1.25747     0.511807    1.11057    …  -0.662174   -1.03763     0.26018   \n",
       " -1.76657    -0.53105    -0.912487      -1.42321    -0.029699   -0.682464  \n",
       "  0.0512941  -0.0150568  -0.437741       1.83015    -2.51441    -0.397115  \n",
       "  ⋮                                  ⋱                                     \n",
       "  0.341157    0.119591    0.219552      -0.110081   -1.64983    -0.690821  \n",
       "  0.427197    0.441082   -0.161548      -0.0600082  -1.06216     0.876975  \n",
       " -0.400908    2.11039    -1.6568     …  -1.17954    -0.407009   -0.0055158 \n",
       " -0.973749   -0.704552   -2.31358        0.646577   -0.0620715  -1.43303   \n",
       " -1.25874    -0.944027   -0.3353         1.17055    -0.146776   -0.268071  \n",
       " -1.02947    -1.25278    -0.316059      -1.1846     -0.42691     0.184362  \n",
       " -0.610671    1.48083     0.0701168     -0.237576   -0.662394   -0.609635  \n",
       "  1.77599    -0.419579   -0.318675   …   2.10293    -0.209376   -0.387682  \n",
       " -1.12168    -1.49454    -0.121125      -1.08378     2.92393    -1.27501   \n",
       " -0.729546    1.3231      1.1151         0.552499   -1.29035    -2.10093   \n",
       "  0.0608892   0.0327831  -0.477881       1.48153     1.385      -0.8402    \n",
       "  0.196996   -0.382383   -0.374761      -0.0566257  -1.34684    -0.00167646"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = decomp.PCA()[:fit](randn(20,10))\n",
    "m[:transform](randn(30, 10))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "PyObject array(['setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',\n",
       "       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',\n",
       "       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',\n",
       "       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',\n",
       "       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',\n",
       "       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',\n",
       "       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',\n",
       "       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',\n",
       "       'setosa', 'setosa', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'versicolor', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'versicolor', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'versicolor', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'versicolor', 'virginica', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'virginica', 'versicolor', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'versicolor', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'versicolor', 'versicolor', 'versicolor', 'versicolor', 'virginica',\n",
       "       'virginica', 'virginica', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'versicolor', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'versicolor', 'versicolor', 'versicolor', 'versicolor',\n",
       "       'versicolor', 'versicolor', 'versicolor', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'virginica', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'virginica', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'virginica', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'virginica', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'virginica', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'versicolor', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'virginica', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'virginica', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'virginica', 'virginica', 'virginica',\n",
       "       'virginica', 'virginica', 'virginica'], \n",
       "      dtype='|S10')"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model[:predict](X)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 0.4.3",
   "language": "julia",
   "name": "julia-0.4"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "0.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
